package cn.edu.whut.system.mapper;

import cn.edu.whut.system.repository.SysUserRepository;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUserRepository> {

    default SysUserRepository findByUsername(String username){
        return selectOne(new LambdaQueryWrapper<SysUserRepository>().eq(SysUserRepository::getUsername, username));
    }
}
